package item.inkcloud.shopservice.config;


import com.alibaba.druid.pool.DruidDataSource;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringBootConfiguration;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Bean;


@MapperScan("item.inkcloud.shopservice.mapper")
@SpringBootConfiguration
public class DruidConfig {


    @ConfigurationProperties(prefix = "spring.datasource")
    @Bean
    DruidDataSource getDataSource(){

        DruidDataSource source = new DruidDataSource();
        source.setTestWhileIdle(false);


        return  source ;

    }





}
